package swarm // Package swarm import "xemo.top/docker/docker/api/types/swarm"
import "os"

// Secret represents a secret
type Secret struct {
	ID string
	Meta
	Spec SecretSpec
}

// SecretSpec represents a secret specification from a secret in swarm
type SecretSpec struct {
	Annotations
	Data []byte `json:",omitempty"`
	// 用于从外部密钥存储中获取密钥值的密钥驱动程序的名称
	// name of the secrets driver used to fetch the secret's value from an external secret store
	Driver *Driver `json:",omitempty"`
	//Templating 控制是否以及如何将secret palyload作为模板进行评估。如果未设置，则不使用模板
	//Templating controls whether and how to evaluate the secret palyload as a template.If it is not set,no templating is used
	Templating *Driver `json:",omitempty"`
}

// SecretReferenceFileTarget is a file target in a secret reference
type SecretReferenceFileTarget struct {
	Name string
	UID  string
	GID  string
	Mode os.FileMode
}

// SecretReference is a reference to a secret in swarm
type SecretReference struct {
	File       *SecretReferenceFileTarget
	SecretID   string
	SecretName string
}
